package utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class DateUtils {

	public static Date toDate(String strDate) throws ParseException {

		if (strDate != null) {
			SimpleDateFormat format = new SimpleDateFormat(
					"dd/MM/yyyy hh:mm:ss.SSS", Locale.ENGLISH);

			return format.parse(strDate);
		} else {
			return null;
		}
	}

	public static Date getNow() {
		return new Date();
	}

}
